<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<html>
<head>
    <title>用户登录</title>
    <link rel="stylesheet" href="assets/css/register.css" />
    <script src="assets/js/jquery-1.8.2.min.js"></script>
    <script src="assets/js/register.js"></script>
    <script src="assets/js/scripts.js"></script>
    <script src="assets/js/RSA.js"></script>
	<script src="assets/js/BigInt.js"></script>
	<script src="assets/js/Barrett.js"></script>
	
	<script type="text/javascript">
			function rsaregister(){
				var thisPwd = document.getElementById("login_password").value;
				alert(thisPwd);
				bodyRSA();
				var result = encryptedString(key, encodeURIComponent(thisPwd));
				//alert(encodeURIComponent(thisPwd)+"\r\n"+result);
				$("#login_password").attr("value",result);
				document.getElementById("formid").submit();
			}
			var key ;
			function bodyRSA(){
				setMaxDigits(130);
			  	key = new RSAKeyPair("10001","","a1be9319d13fae8a0bb6ea5823df10ea3a2f2e085e8f904fa199aefecfaa61fac16ef7ebedb56943f7874b0ad2511d3ca22f6cec5bd827c11200c47c2a7323eb"); 
			}
			function test(){
				alert("test");
			}
			
	</script>
</head>
<body>
    <div id="login">
        <div id="login-t">用户登录</div>
       <form id="formid" action="${pageContext.request.contextPath}/users/register" method="post">
        <div id="login-main">
            <div id="login-con">
                <div class="login-item">
                   	 姓名：<input id="login_name"  name="login_name" type="text" />
                </div>
                <div class="login-item">
                   	 性别：<input id="login_sex" name="login_sex" type="text" />
                </div>
                 <div class="login-item">
                   	 用户：<input id="login_login"  name="login_login" type="text" />
                </div>
                 <div class="login-item">
                   	 密码：<input id="login_password" name="login_password" type="text" />
                </div>
                 <div class="login-item">
                   	 电话：<input id="login_phone"  name="login_phone" type="text" />
                </div>
                 <div class="login-item">
                   	部门：<input id="login_department"  name="login_department" type="text" />
                </div>
                 <div class="login-item">
                   	职位：<input id="login_position"  name="login_position" type="text" />
                </div>
                 <div class="login-item">
                   	 角色：<input id="login_role"  name="login_role" type="text" />
                </div>
                
                <div id="login-btn">
                    <button type="button" onclick="rsaregister()" >录入</button>
                    <input id="btnCancel" type="reset" value="取消" />
                </div>
            </div>         
        </div>
        </form>
    </div>
    <div id="login-msg"></div>
</body>
</html>
